/**
 * @project_name staff_vehicle
 * @package_name com.ssh.web.comonstaff
 * @desc TODO
 * @param
 * @author jack
 * @date 2013-4-28
 * @time 下午6:29:51
 */
package com.ssh.web.comonstaff;

import java.util.List;

import org.apache.struts2.ServletActionContext;

import com.opensymphony.xwork2.ActionSupport;
import com.ssh.model.pdata.CSVWmatePData;
import com.ssh.ser.comonstaff.CSVWmateSerI;

/**
 * @author jack
 * @CSVWmateAction common staff view workmate info
 * @desc 普通员工查看同事信息
 */
public class CSVWmateAction extends ActionSupport {
	/**
	 * TODO
	 */
	private static final long serialVersionUID = 1L;
	private String csVWamteId;
	private List<CSVWmatePData> cSVWmatePDataList;
	private CSVWmateSerI cSVWmateSerI;
	private String firstName;
	private String lastName;
	private Long staffTel;

	/*
	 * (non-Javadoc)
	 *
	 * @see com.opensymphony.xwork2.ActionSupport#execute()
	 */
	@Override
	public String execute() throws Exception {
		// TODO Auto-generated method stub
		try {
			cSVWmatePDataList = cSVWmateSerI.viewAllWokermate();
			ServletActionContext.getRequest().setAttribute("cSVWmatePDataList", cSVWmatePDataList);
		} catch (Exception e) {
			e.printStackTrace();
			return "error";
		}
		return "ok";
	}

	/**
	 * @return the csVWamteId
	 */
	public String getCsVWamteId() {
		return csVWamteId;
	}

	/**
	 * @return the cSVWmatePDataList
	 */
	public List<CSVWmatePData> getcSVWmatePDataList() {
		return cSVWmatePDataList;
	}

	/**
	 * @return the cSVWmateSerI
	 */
	public CSVWmateSerI getcSVWmateSerI() {
		return cSVWmateSerI;
	}

	/**
	 * @return the firstName
	 */
	public String getFirstName() {
		return firstName;
	}

	/**
	 * @return the lastName
	 */
	public String getLastName() {
		return lastName;
	}

	/**
	 * @return the staffTel
	 */
	public Long getStaffTel() {
		return staffTel;
	}

	/**
	 * @param csVWamteId
	 *            the csVWamteId to set
	 */
	public void setCsVWamteId(String csVWamteId) {
		this.csVWamteId = csVWamteId;
	}

	/**
	 * @param cSVWmatePDataList
	 *            the cSVWmatePDataList to set
	 */
	public void setcSVWmatePDataList(List<CSVWmatePData> cSVWmatePDataList) {
		this.cSVWmatePDataList = cSVWmatePDataList;
	}

	/**
	 * @param cSVWmateSerI
	 *            the cSVWmateSerI to set
	 */
	public void setcSVWmateSerI(CSVWmateSerI cSVWmateSerI) {
		this.cSVWmateSerI = cSVWmateSerI;
	}

	/**
	 * @param firstName
	 *            the firstName to set
	 */
	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	/**
	 * @param lastName
	 *            the lastName to set
	 */
	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	/**
	 * @param staffTel
	 *            the staffTel to set
	 */
	public void setStaffTel(Long staffTel) {
		this.staffTel = staffTel;
	}

}
